package com.xg.sys.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xg.sys.entity.SysUserOrgEntity;

import java.util.List;

/**
 * 用户机构关联表
 *
 
 * @email 825612263@qq.com
 * @date 2021-01-11 10:22:45
 */
public interface SysUserOrgService extends IService<SysUserOrgEntity> {

    /**
    *  分页列表
    * @param pageParam
    * @param data
    */
    void pageList(Page<SysUserOrgEntity> pageParam, SysUserOrgEntity data);

    List<Long> getOidListByUid(Long id);

    List<Long> getUserIdListByOid(Long oid);

    /**
     * 删除用户机构关联
     * @param id 用户ID
     * @return 是否删除成功
     */
    boolean removeByUserId(Long id);

    /**
     * 关联用户机构
     * @param userOrgEntity
     */
    void relateUser(SysUserOrgEntity userOrgEntity);

    List<SysUserOrgEntity> getOidListByUidList(List<Long> uidList);
}

